import request from '/@/utils/request';

/**
 * 会员
 * @param params 要传的参数值
 * @returns 返回接口数据
 * 会员api接口集合
 */
export function useMemberLevelApi() {
	return {
		getMemberLevelList: (data) => {
			return request({
				url: '/member/member-level/level/list',
				method: 'post',
				data,
			});
		},
		addMemberLevel: (data) => {
			return request({
				url: '/member/member-level/admin/level/add',
				method: 'post',
				data,
			});
		},
		updateMemberLevel: (data) => {
			return request({
				url: '/member/member-level/admin/level/update',
				method: 'post',
				data,
			});
		},
		delMemberLevel: (data) => {
			return request({
				url: '/member/member-level/admin/level/del',
				method: 'post',
				data,
			});
		},
	};
}

export function useMemberRecommendApi() {
	return {
		getMemberRecommendList: (data) => {
			return request({
				url: '/member/member-recommend/admin/recommend/list',
				method: 'post',
				data,
			});
		},
		addMemberRecommend: (data) => {
			return request({
				url: '/member/member-recommend/admin/recommend/add',
				method: 'post',
				data,
			});
		},
		updateMemberRecommend: (data) => {
			return request({
				url: '/member/member-recommend/admin/recommend/update',
				method: 'post',
				data,
			});
		},
		delMemberRecommend: (data) => {
			return request({
				url: '/member/member-recommend/admin/recommend/del',
				method: 'post',
				data,
			});
		},
		getMemberRecommendLevelList: (data) => {
			return request({
				url: '/member/admin/memberLevel',
				method: 'post',
				data,
			});
		},
	};
}

export function useMemberMoneyApi() {
	return {
		getMoneyList: (data) => {
			return request({
				url: '/member/member-money/money/list',
				method: 'post',
				data,
			});
		},
		updateMoney: (data) => {
			return request({
				url: '/member/member-money/admin/money/update',
				method: 'post',
				data,
			});
		},
		addMoney: (data) => {
			return request({
				url: '/member/member-money/admin/money/add',
				method: 'post',
				data,
			});
		},
	};
}
